This tutorial shows how to edit properties of a View.
In this tutorial we will change color of a Text Label to Red.
View properties can be configured in following ways (changes are automatically reflected in all places)
● directly inside Code .foregroundColor(Color.red)
● through Attributes Inspectors Color: Red
● through Popup inside Automatic Preview Command + Click - Show SwiftUI Inspector
Edit View Properties
ContentView.swift
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Text("Hello World!")
.foregroundColor(Color.red)
}
}
}
.background(Image("Background"), alinment: .center)
Doesn’t se file name
Text, Font
Shadow
.shadow
.foregroundColor
iosfonts.com
.font(Arial Rounded MT Bold)